
<link rel="stylesheet" href="jquery/easyui/themes/default/easyui.css">
<link rel="stylesheet" href="jquery/easyui/themes/icon.css">
<body>

<input id="dd" class="easyui-datebox" data-options="onSelect:onSelect"></input>

<script src="https://upload.shinehao.com.cn/20180816150739jquery-1.8.3.min.js"></script>
<script src="https://upload.shinehao.com.cn/20180816145716jquery.easyui.min.js"></script>
<script src="https://upload.shinehao.com.cn/20180816151727easyui-lang-zh_CN.js"></script>
<script>
var material_source_type = window.parent.getMyUrlQueryString(window.location.href,"material_source_type");
var uniqueid = window.parent.getMyUrlQueryString(window.location.href,"uniqueid");
var td_uniqueid = window.parent.getMyUrlQueryString(window.location.href,"td_uniqueid");
var tr_uniqueid = window.parent.getMyUrlQueryString(window.location.href,"tr_uniqueid");
var ev = window.parent.getMyUrlQueryString(window.location.href,"ev");
var cpLock = false;



function myformatter(date){
	var y = date.getFullYear();
	var m = date.getMonth()+1;
	var d = date.getDate();
	return y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d);
}
function myparser(s){
	if (!s) return new Date();
	var ss = (s.split('-'));
	var y = parseInt(ss[0],10);
	var m = parseInt(ss[1],10);
	var d = parseInt(ss[2],10);
	if (!isNaN(y) && !isNaN(m) && !isNaN(d)){
		return new Date(y,m-1,d);
	} else {
		return new Date();
	}
}

function onSelect(date){
	var str = myformatter(date);
	$($(window.parent.document).find("[uniqueid='"+uniqueid+"']")).find("[name='"+ev+"']").text(str.trim());
	window.parent.tbsourcefactoryColresizeEvent.destroydialog();
}

$(function(){
	$('#dd').datebox('setValue', $($(window.parent.document).find("[uniqueid='"+uniqueid+"']")).find("[name='"+ev+"']").text());	
	$(".textbox-icon").click();
})
</script>
</body>


























